package org.zjx.controller;


import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import org.zjx.common.bean.Result;
import org.zjx.dao.entity.Npc;
import org.zjx.dao.entity.Prop;
import org.zjx.service.impl.INpcService;

import java.util.List;

/**
 * <p>
 * npc属性 前端控制器
 * </p>
 *
 * @author 
 * @since 2025-05-30
 */
@Tag(name = "npc管理接口")
@RestController
@RequestMapping("/npc")
@RequiredArgsConstructor
public class NpcController {
    final private INpcService npcService;

    @Operation(summary = "查询Npc")
    @PostMapping("/selectNpc/{name}")
    public Result<Npc> selectNpc(@Parameter(description = "NPC名称") @PathVariable("name") String name) {
        Npc npc = npcService.getNpcByName(name);
        return Result.isOk().data(npc);
    }

}
